package com.dnjn.happiness.survey.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dnjn.happiness.survey.api.model.StatisticalAnalysisModel;
import com.dnjn.happiness.survey.domain.Survey;
import com.dnjn.happiness.survey.domain.SurveyRecord;
import com.dnjn.happiness.survey.domain.vo.StatisticalAnalysisAppriseVO;

import java.util.List;

/**
 * <p>
 * 问卷 服务类
 * </p>
 *
 * @author Amber
 * @since 2023-10-04
 */
public interface ISurveyService extends IService<Survey> {
    /**
     * 发起问卷
     *
     * @param survey
     * @return
     */
    int saveSurvey(Survey survey);

    Page<Survey> selectPageSurvey(Survey domain, Page page);

    Page<Survey> selectPageSurvey1(Survey domain, Page page);


    void endSurveyId(Long surveyId);

    void issuedSurveyId(Long surveyId);

    int updateSurvey(Survey survey);

    void endTime(Survey one) throws Exception;

    void startTime(Survey one) throws Exception;

    Boolean deleteSurvey(Long surveyId);

    Page<SurveyRecord> selectSurveyRecordByUserId(Long userId, Page page);

    List<StatisticalAnalysisModel> selectStatisticalAnalysisSurvryList(StatisticalAnalysisAppriseVO vo);

    List<Survey> querySvrveyAllByUserId(Long userId);
}
